using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;

namespace Dal.Models.Mapping
{
    public class RECIEVEMap : EntityTypeConfiguration<RECIEVE>
    {
        public RECIEVEMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.PHONE)
                .HasMaxLength(50);

            this.Property(t => t.CONTENT)
                .HasMaxLength(500);

            this.Property(t => t.RTIME)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("RECIEVE");
            this.Property(t => t.PHONE).HasColumnName("PHONE");
            this.Property(t => t.CONTENT).HasColumnName("CONTENT");
            this.Property(t => t.RTIME).HasColumnName("RTIME");
            this.Property(t => t.ID).HasColumnName("ID");
        }
    }
}
